package com.zhisuo.apicenter.model;

import org.springframework.jdbc.core.RowMapper;

import java.sql.ResultSet;
import java.sql.SQLException;

public class SalesmanRowMapper implements RowMapper<Salesman> {

    @Override
    public Salesman mapRow(ResultSet rs, int rowNum) throws SQLException {
        Salesman salesman = new Salesman();
        salesman.setId(rs.getInt("id"));
        salesman.setCompanyname(rs.getString("companyname"));
        salesman.setMobile(rs.getString("mobile"));
        salesman.setName(rs.getString("name"));
        return salesman;
    }

}
